home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 4 / Amiga Tools 4.iso / tools / schulungen / drafuplus / help / english / dfu.doc next >
Text File  |  1996-02-02  |  4KB  |  124 lines

  1.  
  2.  .DFU Fileformat description
  3.  ===========================
  4.  
  5.    Preface :
  6.    ---------
  7.  
  8.    The "By-Hand"-Creation of DRAFU-Memo-Files, which then later can loaded
  9.    by the main program, is actually possible.
  10.    In the following text it is explained how to do it.
  11.  
  12.  
  13.    General actions / Background :
  14.    ------------------------------
  15.  
  16.    All the data needed to display and memorize a function,
  17.    is stored by DRAFU in a special data-structure.
  18.    Not all of this data is needed to be saved later, to allow
  19.    a reconstruction of the described functions (e.g. no pointers
  20.    are needed).
  21.    In the following part the format of a typical ".dfu"-File is described.
  22.    After studying this description you should be able to create your own
  23.    Files with a Text-Editor.
  24.  
  25.    Perhaps you need not doing this, because you may enter all functions
  26.    within DRAFU's "Function-Requester" and then later save it in a File,
  27.    but the knowledge about the format of those files will perhaps allow
  28.    you to convert older data - e.g. created by other programs - into
  29.    the format used by DRAFU.
  30.  
  31.  
  32.    Format of a DRAFU-Memo-File :
  33.    -----------------------------
  34.  
  35.      At the beginning of the File you always find the string "DFU_V1",
  36.      at the end there's a string containing "ENDE" (which actually is the
  37.      german word for <end> or <finish>).
  38.      Note : Each ".dfu"-File MUST have the extension ".dfu".
  39.         Otherwise it will not work !!!
  40.  
  41.  
  42.      Entry-Name     Entry-Type      Entry's Meaning / Possible Content
  43.      ----------     ----------      ----------------------------------
  44.  
  45.      fm_FX        Textstring      Function itself (upto 255 chars)
  46.                   (with partly-defined functions
  47.                    (ASWD-Functions) only a name)
  48.      fm_StepSize    Dec. Number   Step-Size
  49.      fm_SminX        Dec. Number   left border for X-Values
  50.      fm_SmaxX        Dec. Number   right border for X-Values
  51.      fm_SminY        Dec. Number   left border for Y-Values
  52.      fm_SmaxY        Dec. Number   right border for Y-Values
  53.      fm_Status        Integer      at the moment :
  54.             Number
  55.                   2 for "Draw"     (1<<1)
  56.                   4 for "Not Draw" (1<<2)
  57.  
  58.      fm_Color        Integer      Number of draw-color
  59.      fm_SplitNum    Integer      at the moment : ALWAYS NULL !
  60.      fm_ExtFlag     Integer      at the moment :
  61.             Number
  62.                   0 for "usual function"            (FALSE)
  63.                   1 for "ASWD-function"             ( TRUE)
  64.  
  65.      THE FOLLOWING ENTRIES ONLY EXIST, IF fm_ExtFlag IS SET TO 1 :
  66.  
  67.      efm_FX1        Textstring      1st function (ASWD-part)
  68.      efm_FX2        Textstring      2nd function (ASWD-part)
  69.      efm_FX3        Textstring      3rd function (ASWD-part)
  70.      efm_rightbor1  Dec. Number   right border for X-Values of efm_FX1
  71.      efm_rightbor2  Dec. Number   right border for X-Values of efm_FX2
  72.      efm_rightbor3  Dec. Number   right border for X-Values of efm_FX3
  73.  
  74.      AFTER THESE ENTRIES MORE FUNCTION-ENTRIES MAY FOLLOW.
  75.      THE FORMAT IS THE SAME AS DESCRIBED ABOVE.
  76.  
  77.  
  78.    Format of a DRAFU-Memo-File : An example
  79.    ----------------------------------------
  80.  
  81.    Note :    The file has to be an ASCII-File.
  82.          Lines are separated by a RETURN / LINEFEED as
  83.          usual.
  84.          Leading Spaces are not allowed (also not useful).
  85.          Files may be created with every Text-Editor.
  86.          Comments have been added later (NOT part of the file).
  87.  
  88.          >>> Example File Begin
  89.  
  90.          DRAFU
  91.          x^4         /* FIRST Function : f(x) = x^4    */
  92.          0.100000
  93.          -20.000000
  94.          20.000000
  95.          -20.000000
  96.          20.000000
  97.          4             /* Function will not be drawn.    */
  98.          1             /* Color # 1               */
  99.          0             /* NULL                   */
  100.          0             /* No ASWD-Function.
  101.          x^3         /* SECOND Function : f(x) = x^3   */
  102.          0.100000
  103.          -20.000000
  104.          20.000000
  105.          -20.000000
  106.          20.000000
  107.          4             /* Function will not be drawn.    */
  108.          1             /* Color # 1               */
  109.          0             /* NULL                   */
  110.          0             /* No ASWD-Function.
  111.          x^2         /* THIRD Function : f(x) = x^3    */
  112.          0.100000
  113.          -20.000000
  114.          20.000000
  115.          -20.000000
  116.          20.000000
  117.          4             /* Function will not be drawn.    */
  118.          1             /* Color # 1               */
  119.          0             /* NULL                   */
  120.          0             /* No ASWD-Function.
  121.          ENDE
  122.  
  123.          >>> Example File End
  124.